package com.hykj.xxltest.service;

import com.hykj.xxltest.base.BaseService;
import com.hykj.xxltest.mapper.CourierorderMapper;
import com.hykj.xxltest.model.CourierModel;
import com.hykj.xxltest.model.CourierorderModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;


@Service
public class CourierorderService extends BaseService<CourierorderModel,CourierorderMapper> {

    @Autowired
    CourierService courierService;


    public CourierorderModel change(CourierorderModel model, Map condition){
        if (model.getCourierid() > 0){
            CourierModel courierModel = courierService.getById(model.getCourierid());
            model.setCouriername(courierModel.getNickname());
        }
        return model;


    }


}
